using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;

namespace Planisoft.DAO.Mapping
{
    public class FinalizacionContratoMap : EntityTypeConfiguration<FinalizacionContrato>
    {
        public FinalizacionContratoMap()
        {
            // Primary Key
            this.HasKey(t => t.IdFinalizaContrato);

            // Properties
            this.Property(t => t.CodPdtFinalizaCont)
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("FinalizacionContrato");
            this.Property(t => t.IdFinalizaContrato).HasColumnName("IdFinalizaContrato");
            this.Property(t => t.CodPdtFinalizaCont).HasColumnName("CodPdtFinalizaCont");
            this.Property(t => t.DescFinalizaCont).HasColumnName("DescFinalizaCont");
        }
    }
}
